import request from './../utils/request'
/**
 * 获取商品列表数据
 * @param {*} params 
 */
export function getProList () {
  return request({
    url: '/pro/list'
  })
}

/**
 * proid
 * type isseckill, isrecommend
 * flag  true   false
 * @param {*} params 
 */
export function updateFlag (params) {
  return request({
    url: '/pro/updateFlag',
    method: 'POST',
    data: params
  })
}
// 获取分类的数据
export function getCategory () {
  return request({
    url: '/pro/getCategory'
  })
}

// 获取秒杀数据
export function getSeckillList () {
  return request({
    url: '/pro/showdata',
    method: 'POST',
    data: {
      type: 'isseckill',
      flag: 1
    }
  })
}
// 获取推荐数据
export function getRecommendList () {
  return request({
    url: '/pro/showdata',
    method: 'POST',
    data: {
      type: 'isrecommend',
      flag: 1
    }
  })
}
// 筛选 
export function searchPro (parmas) {
  return request({
    url: '/pro/searchPro',
    method: 'POST',
    data: parmas
  })
}